package com.icss.train_sys_back.service.train_manage.impl;

import com.icss.train_sys_back.entity.train_manage.RailwayBureauEntity;
import com.icss.train_sys_back.mapper.train_manage.RailwayBureauManageMapper;
import com.icss.train_sys_back.service.train_manage.RailwayBureauManageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author 小泽
 * @createTime 2025/9/22 10:17
 */
@Service
public class RailwayBureauManageServiceImpl implements RailwayBureauManageService {
    @Autowired
    private RailwayBureauManageMapper railwayBureauManageMapper;
    //铁路局列表查询
    @Override
    public List<RailwayBureauEntity> findBureauList(String bureauName, String bureauCode) {
        return railwayBureauManageMapper.findBureauList(bureauName,bureauCode);
    }

    //铁路局保存
    @Override
    public boolean save(RailwayBureauEntity railwayBureau) {
        return railwayBureauManageMapper.save(railwayBureau);
    }

    //铁路局更新
    @Override
    public boolean update(RailwayBureauEntity railwayBureau) {
        return railwayBureauManageMapper.update(railwayBureau);
    }

    //根据id删除铁路局
    @Override
    public boolean delete(Integer id) {
        return railwayBureauManageMapper.delete(id);
    }

    @Override
    public List<RailwayBureauEntity> getAllBureauList() {
        return railwayBureauManageMapper.getAllBureauList();
    }
}
